if (typeof (mediator) == 'undefined')
	mediator = {};

if (typeof (mediator.personInfoWidget) == 'undefined')
	mediator.personInfoWidget = {};

mediator.personInfoWidget.renderView = function(){
	//个人信息
	$("#realName").attr('data-bind', "visible : realName");
	$("#workUnit").attr('data-bind', "visible : workUnit");
	$("#telephone").attr('data-bind', "visible : telephone");
	$("#email").attr('data-bind', "visible : email ");
	$("#qq").attr('data-bind', "visible : qq");
	$("#location").attr('data-bind', "visible : location ");
	$("#job").attr('data-bind', "visible : job ");
	$("#headPortrait").attr("data-bind", "attr:{src:headPortrait}");
	$('#signature').attr('data-bind', 'text:signature');
	$('#showName').attr('data-bind', 'text:showName');

	$('#realName > sapn').attr('data-bind', 'text : realName');
	$("#location > span").attr('data-bind', 'text : location');
	$("#workUnit > span").attr('data-bind', 'text : workUnit');
	$("#telephone > span").attr('data-bind', 'text : telephone');
	$("#email > span").attr('data-bind', 'text : email');
	$("#qq > span").attr('data-bind', 'text : qq');
	$("#job > span").attr('data-bind', 'text : job');
};

mediator.personInfoWidget.createViewMediator = function(pid) {
	var viewModel = model.person.factory.createByPersonId(pid);
	mediator.personInfoWidget.renderView();
	var viewNode = $('#personInfo')[0];
	ko.applyBindings(viewModel, viewNode);
};





